
class AntLibHelper {
    def namespace, ant
    Object invokeMethod(String name, Object params) {
        ant."antlib:$namespace:$name"(*params)
    }
}

def expando = new groovy.util.Expando()

expando.init = { window ->
   expando.workbenchWindow = window	
}

expando.run = {action ->
  def ant = new AntBuilder()
  
  ant.echo("Lets see what Ant can do! :)")
  
  ant.sequential {
    echo("inside sequential")
    myDir = "target/AntTest/"
    mkdir(dir:myDir) 
    copy(todir:myDir) {
        fileset(dir:"e:/lib/groovy-1.0") {
            include(name:"**/*.jar")
        }
    }
    echo("done")
  }

}

expando.selectionChanged = {action, selection ->
	expando.selection = selection
}

expando.dispose = {  }

expando

